package javase.collections;

import java.util.WeakHashMap;

public class WeakReferenceTest {
	public static void main(String[] args) {
//		WeakReference<Integer> weakInteger = new WeakReference<Integer>(10);
		
		WeakHashMap<String, Integer> map = new WeakHashMap<String, Integer>();
		
		for (int i = 0; i < 10; i++) {
			map.put("key" + i, i);
		}
		System.out.println(map.keySet());
		System.gc();
		System.out.println(map.keySet());
	}
}
